<div class="task">
<?php include ('buttons.tpl'); ?>
</div>
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
<h2><?php echo $heading_title; ?></h2>
<div class="description"><?php echo $heading_description; ?></div>
<script type="text/javascript" src="javascript/tab/tab.js"></script>
<?php $tpl->headInject('<link rel="stylesheet" type="text/css" href="javascript/tab/tab.css" />'); ?>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
  <div id="tabs">
	<ul>
	  <li><a href="#tabs-1"><?php echo $tab_general; ?></a></li>
	</ul>
	<div id="tabs-1">
      <table>
        <tr>
          <td width="185"><?php echo $entry_status; ?></td>
          <td><select name="global_paypal_status">
              <?php if ($global_paypal_status) { ?>
              <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
              <option value="0"><?php echo $text_disabled; ?></option>
              <?php } else { ?>
              <option value="1"><?php echo $text_enabled; ?></option>
              <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
              <?php } ?>
            </select></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_email; ?></td>
          <td><input type="text" name="global_paypal_email" value="<?php echo $global_paypal_email; ?>" />
            <?php if ($error_email) { ?>
            <span class="error"><?php echo $error_email; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_test; ?></td>
          <td><?php if ($global_paypal_test) { ?>
            <input type="radio" name="global_paypal_test" value="1" checked="checked" />
            <?php echo $text_yes; ?>
            <input type="radio" name="global_paypal_test" value="0" />
            <?php echo $text_no; ?>
            <?php } else { ?>
            <input type="radio" name="global_paypal_test" value="1" />
            <?php echo $text_yes; ?>
            <input type="radio" name="global_paypal_test" value="0" checked="checked" />
            <?php echo $text_no; ?>
            <?php } ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_order_status_unconfirm; ?></td>
          <td><select name="global_paypal_ord_status_unconfirm">
              <?php foreach ($order_statuses as $order_status) { ?>
              <?php if ($order_status['order_status_id'] == $global_paypal_ord_status_unconfirm) { ?>
              <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $order_status['order_status_id']; ?>" ><?php echo $order_status['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select></td>
          <td><?php echo $extra_order_status_unconfirm; ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_order_status_confirm; ?></td>
          <td><select name="global_paypal_ord_status_confirm">
              <?php foreach ($order_statuses as $order_status) { ?>
              <?php if ($order_status['order_status_id'] == $global_paypal_ord_status_confirm) { ?>
              <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $order_status['order_status_id']; ?>" ><?php echo $order_status['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select></td>
          <td><?php echo $extra_order_status_confirm; ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_pdt_token; ?></td>
          <td width="200"><input type="text" name="global_paypal_pdt_token" value="<?php echo $global_paypal_pdt_token; ?>" />
            <?php if ($error_pdt_token) { ?>
            <span class="error"><?php echo $error_pdt_token; ?></span>
            <?php } ?></td>
            <td><?php echo $extra_pdt_token; ?></td>
        </tr>
        <tr>
          <td width="185"><?php echo $entry_itemized; ?></td>
          <td width="200"><select name="global_paypal_itemized">
              <option value="0" <?php echo ($global_paypal_itemized == '0' ? 'selected' : '') ?>><?php echo $text_no; ?></option>
              <option value="1" <?php echo ($global_paypal_itemized == '1' ? 'selected' : '') ?>><?php echo $text_yes; ?></option>
            </select></td>
            <td><?php echo $extra_itemized; ?></td>
        </tr>
        <tr>
          <td width="185"><?php echo $entry_ipn_debug; ?></td>
          <td width="200"><select name="global_paypal_ipn_debug">
              <option value="0" <?php echo ($global_paypal_ipn_debug == '0' ? 'selected' : '') ?>><?php echo $text_no; ?></option>
              <option value="1" <?php echo ($global_paypal_ipn_debug == '1' ? 'selected' : '') ?>><?php echo $text_yes; ?></option>
            </select></td>
            <td><?php echo $extra_ipn_debug; ?></td>
        </tr>
        <tr>
          <td width="185"><?php echo $entry_auth_type; ?></td>
          <td width="200"><select name="global_paypal_auth_type">
              <option value="sale" <?php echo ($global_paypal_auth_type == 'sale' ? 'selected' : '') ?>><?php echo $text_sale; ?></option>
              <option value="authorization" <?php echo ($global_paypal_auth_type == 'authorization' ? 'selected' : '') ?>><?php echo $text_authorization; ?></option>
              <!--<option value="order" <?php echo ($global_paypal_auth_type == 'order' ? 'selected' : '') ?>><?php echo $text_order; ?></option>-->
            </select></td>
            <td><?php echo $extra_auth_type; ?></td>
        </tr>
        <tr>
          <td valign="top"><?php echo $entry_currency; ?></td>
          <td><select name="global_paypal_currency[]" multiple="multiple">
              <?php foreach ($currencies as $currency) { ?>
              <?php if ($currency['selected']) { ?>
              <option value="<?php echo $currency['value']; ?>" selected="selected"><?php echo $currency['text']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $currency['value']; ?>"><?php echo $currency['text']; ?></option>
              <?php } ?>
              <?php } ?>
            </select></td>
        </tr>
        <tr>
          <td width="185"><?php echo $entry_geo_zone; ?></td>
          <td><select name="global_paypal_geo_zone_id">
              <option value="0"><?php echo $text_all_zones; ?></option>
              <?php foreach ($geo_zones as $geo_zone) { ?>
              <?php if ($geo_zone['geo_zone_id'] == $geo_zone_id) { ?>
              <option value="<?php echo $geo_zone['geo_zone_id']; ?>" selected="selected"><?php echo $geo_zone['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $geo_zone['geo_zone_id']; ?>"><?php echo $geo_zone['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select></td>
        </tr>
        <tr>
          <td><?php echo $entry_sort_order; ?></td>
          <td><input type="text" name="global_paypal_sort_order" value="<?php echo $global_paypal_sort_order; ?>" size="1" /></td>
        </tr>
      </table>
      <table width="100%">
        <tr>
          <td><?php echo $text_support; ?></td>
        </tr>
      </table>
    </div>
  </div>
  <script type="text/javascript"><!--
	$(function() {
		$("#tabs").tabs();
	});
  //--></script>
</form>
